﻿<%@ Page Title="采购单统计" Language="C#" MasterPageFile="~/Master/MasterPage.master"
	AutoEventWireup="True" CodeBehind="OrderStatistics.aspx.cs" Inherits="TotalDrugs_OrderStatistics" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="../Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
	<div id="tabcontent2">
		<uc1:QueryControl ID="QueryControl1" runat="server" />
	</div>
	<asp:GridView ID="gvwInfo" runat="server" EmptyDataText="暂无符合条件的数据！" AutoGenerateColumns="False"
		CssClass="mainlist" DataKeyNames="OrderID,OrderName" OnRowCommand="gvwInfo_RowCommand">
		<Columns>
			<asp:TemplateField HeaderText="序号">
				<ItemTemplate>
					<%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
				<HeaderStyle Width="30px" />
			</asp:TemplateField>
			<asp:BoundField DataField="OrderID" HeaderText="订单编号" />
			<%--          <asp:BoundField DataField="HospitalID" HeaderText="医院编号" />--%>
			<asp:BoundField DataField="OrderName" HeaderText="采购单" />
			<asp:BoundField DataField="StartTime" HeaderText="开始时间" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}" />
			<asp:BoundField DataField="PlanEndTime" HeaderText="结束时间" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}" />
			<asp:BoundField DataField="HospitalName" HeaderText="医院名称" />
			<%--<asp:BoundField DataField="Remarks" HeaderText = "备注" /> --%>
			<%--    <asp:BoundField DataField="PurchaseCountTotal" HeaderText="采购总数量" />--%>
			<asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" DataFormatString="{0:N3}" />
			<%--          <asp:BoundField DataField="CountOrder" HeaderText="采购次数" />
            <asp:BoundField DataField="PriceAvg" HeaderText="平均采购价" DataFormatString="{0:F3}" />--%>
			<%--       <asp:BoundField DataField="DistributeRate" HeaderText="配送率" DataFormatString="{0:P2}" />--%>
			<%--   <asp:BoundField DataField="DistributeCountTotal" HeaderText="总配送量" />--%>
			<%--         <asp:BoundField DataField="WareHouseCountTotal" HeaderText="入库总数量" />
            <asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库总金额" />
            <asp:BoundField DataField="WareHouseRate" HeaderText="入库率" DataFormatString="{0:P2}" />--%>
			<%--      <asp:BoundField DataField="TotalAmount" HeaderText="订单总金额" />--%>
			<asp:TemplateField HeaderText="查看">
				<ItemTemplate>
					<asp:LinkButton ID="lbnCom_PS" runat="server" CommandName="DirectByCom" CommandArgument='<%# Eval("OrderID")+","+Eval("OrderName") %>'
						ToolTip="按不同的配送企业来查看该订单的药品交易情况">配送企业</asp:LinkButton>
					<asp:LinkButton ID="lbnDrug" runat="server" CommandName="DierectByDrug" CommandArgument='<%# Eval("OrderID")+","+Eval("OrderName")  %>'
						ToolTip="按不同的药品来查看该医院的药品交易情况">相关药品</asp:LinkButton>
					<asp:LinkButton ID="lbnDetail" runat="server" CommandName="DierectByDetail" CommandArgument='<%# Eval("OrderID")+","+Eval("OrderName")  %>'
						ToolTip="查看该订单的药品交易详细情况">采购明细</asp:LinkButton>
				</ItemTemplate>
			</asp:TemplateField>
			<asp:TemplateField HeaderText="其它">
				<ItemTemplate>
					<asp:DropDownList ID="ddlOther" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOther_SelectedIndexChanged"
						DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="Id">
					</asp:DropDownList>
				</ItemTemplate>
			</asp:TemplateField>
		</Columns>
	</asp:GridView>
	<div class="page">
		<webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
		</webdiyer:AspNetPager>
	</div>
	<%-- <asp:Button ID="btnExcel" runat="server" CssClass="btn" Text="导出数据"  
        onclick="btnExcel_Click" />--%>
	<hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" />&nbsp;统计：<asp:Label
		ID="lblCount" runat="server"></asp:Label>
	<div class="listip">
		<ul>
			<asp:LinkButton ID="lbtnSee" runat="server" OnClick="lbtnSee_Click" Font-Size="Small"
				Visible="false">显示图表</asp:LinkButton>
			<uc2:ChartControl ID="ChartControl1" runat="server" Visible="False" />
			<li>说明:<span>可以点击相应按钮进入查看详细信息</span> </li>
		</ul>
	</div>
</asp:Content>
